﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data.OleDb;
using DAO;
using DTO;
using BUS;

namespace QL_xxx
{
	/// <summary>
	/// Interaction logic for QLPhieuThuePhong_View.xaml
	/// </summary>
	public partial class QLThuePhong_View : UserControl
	{
        private List<PhieuThuePhongDTO> DSPhieuThue;
		public QLThuePhong_View()
		{
			this.InitializeComponent();
		}

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            DSPhieuThue = PhieuThuePhongBUS.LayDSPhieuThuePhong();
            LoadGrid(DSPhieuThue);
        }

        private void LoadGrid(List<PhieuThuePhongDTO> listPhieuThue)
        {
            if (listPhieuThue != null && listPhieuThue.Count > 0)
            {
                GridPhieuThuePhong.ItemsSource = listPhieuThue;

            }
        }
	}
}